/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package redis.manage;

/**
 *
 * @author dell
 */

public class MRedisPool extends RedisPool
{
//static instance_______________________________________________________________
private static MRedisPool pool;    
private static String poolxml="src/java/conf/redis/mredispool-conf.xml";
private static String redisxml="src/java/conf/redis/mredis-conf.xml";
static
{
     if(pool==null) pool=new MRedisPool();
     pool.init(poolxml);
     if(!pool.initialized) System.err.println("MRedisPool fails to init");
}
public static boolean getInitialized()
{
     return pool.initialized;
}
/**
 * get a MRedis instance from pool
 * @return 
 */        
public static MRedis getMRedis()
{
     MRedis m=new MRedis();
     m.jedis=pool.getJedis();
     m.init(redisxml);
     return m;
}
}
